import java.lang.System;
import java.text.SimpleDateFormat;
import java.util.Date;

public class TestSimpleDateFormat{
    private static SimpleDateFormat format = new SimpleDateFormat("yyyy-MM--dd HH:mm:ss");
    public static void main(String[] args) {
        long bt = System.currentTimeMillis();
        System.out.println(bt);
        String nowTime = format.format(new Date(bt));
        System.out.println(nowTime);
    }
}